A data model represents a framework that organizes elements of data and standardizes how they relate to one another in a database. Data models provide a standardized method for defining and formatting database contents consistently across systems, enabling different applications to share the same data. Professional data modeling tools provide a way to generate structured query language (SQL) from a modeled entity relationship (ER) diagram.
Some data models are defined and consumed in the database layer rather than in the application layer (or server). One such example is SAP Core Data Services (CDS), which is a data modeling infrastructure that provides a Data Definition Language (DDL) for defining semantically rich database tables/views (CDS views) and user-defined types in the database. CDS provides support for conceptual modeling and relationship definitions, built-in functions, and extensions.
Data models may be defined as views (e.g., CDS views), which can be used in applications (e.g., Fiori Apps) to enable access to the database. Data model views may be created as design-time files and natively integrated into the database layer to take advantage of in-memory database computing (e.g., SAP HANA) to achieve good performance for high data volume. However, the database layer is unable to handle customized complex calculations. Such customized calculations are typically programmed within the application using an application programming language (e.g., SAP ABAP). Application logic (e.g., data reading, processing, output), programmed using such application programming language, is suitable for processing small to medium data volumes and customized complex calculations.
The application is typically executed within an application layer (e.g., SAP Netweaver), while the data model view is run within the database layer (e.g., SAP HANA). Therefore, application logic may only be inserted before or after the execution of the data model (e.g., CDS view). It is not possible to invoke application logic within the execution of the data model view. For those applications that require complex calculations on top of high data volume, complex calculation logic may be re-implemented within the data model view, which is not good at handling complex calculations. Alternatively, results from the data model view are processed again in the application, which is not good at handling large data volumes.